﻿@model FreightSoft.Models.SHIPMENT

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/Part_Layout.cshtml";
}
@{
    FreightSoft.Models.Entities db = new FreightSoft.Models.Entities();
    FreightSoft.Models.SHIPMENT shipment = db.SHIPMENTs.Find(@Model.SHIPMENTID);    
}

<html>
<body>

<h2>Shipment Delivery Note Report - @Model.SHIPMENTID</h2>

<br />


<table class="table">
     
    <tr class="active"><td><b>Shipment Id</b></td><td><b>Planned Start Date</b></td><td><b>Planned Delivery Date</b></td></tr>
    <tr class="active"><td>@shipment.SHIPMENTID</td><td>@shipment.PLANNED_START_DATE</td><td>@shipment.PLANNED_DELIVERY_DATE</td></tr>
    <tr class="active"><td><b>Starting Port</b></td><td><b>Destination Port</b></td><td><b>Status</b></td></tr>
    <tr class="active"><td>@Model.ORIGINPORT</td><td>@Model.DESTINATIONPORT</td><td>@shipment.STATUS</td></tr>
    <tr class="active"><td><b>Total Weight (kg)</b></td><td><b>Total Volume (m3)</b></td><td></td></tr>
    <tr class="active"><td>@shipment.WEIGHT</td><td>@shipment.VOLUME</td><td></td></tr>
    <tr class="active"><td></td><td></td><td></td></tr>
</table>
<br />




<table class="table table-striped">
    <tr>
       <th>
            @Html.DisplayNameFor(model => model.SHIPMENTLINEs.ElementAt(0).SHIPMENTLINENO)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SHIPMENTLINEs.ElementAt(0).ORDERID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.SHIPMENTLINEs.ElementAt(0).CUSTOMERID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.VOLUME)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.WEIGHT)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.STATUS)
        </th>
    </tr>

@foreach (var item in Model.SHIPMENTLINEs) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.SHIPMENTLINENO)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ORDERID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CUSTOMERID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.VOLUME)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.WEIGHT)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.STATUS)
        </td>

        
    </tr>
}
    </table>


</body>
</html>

